<!DOCTYPE html>
<html>
    <head>
        <script src="vue.js"></script>
    </head>
    <body>
        <div id="app">
            <my-component></my-component>

        </div>
        <script>
            var com1 = {
                        template : '<p>我是vm实例中的局部组件</p>'
            }

            var vm = new Vue({
                el:'#app',
                components : {
                    myComponent : com1
                    
                }
            })
        </script>
    </body>
</html>